<?php 
/**
* @Enterprise: S&S Media Solutions
* @author: Yannick Spang
* @creation date: April 2009
* @url: http://www.joomla-virtuemart-designs.com
* @copyright: Copyright (C) 2008 - 2009 S&S Media Solutions
* @license: Commercial, see LICENSE.php
* @product: Flypage Admirable - Virtuemart Theme
* @version: 1.0
*/

if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
mm_showMyFileName(__FILE__);
?>

<!--Add Files-->
<?php
global $db;
$language = &JFactory::getLanguage();
$language->load('vmtheme_flypage_admirable');
$document = & JFactory::getDocument();
$document->addStyleSheet(JURI::base(true).'/components/com_virtuemart/themes/ilvm_theme/css/flypage_themes/flypage_admirable/style.css');
$ssmedvmimageshow = JPATH_SITE.DS.'components'.DS.'com_virtuemart'.DS.'themes'.DS.'ilvm_theme'.DS.'includes'.DS.'flypage_themes'.DS.'flypage_admirable'.DS.'ssmed_imgshow.php';
$ssmedadditionals = JPATH_SITE.DS.'components'.DS.'com_virtuemart'.DS.'themes'.DS.'ilvm_theme'.DS.'includes'.DS.'flypage_themes'.DS.'flypage_admirable'.DS.'ssmed_additionals.php';
$url = 'index.php?page=shop.product_details&amp;flypage='.$flypage.'&amp;product_id='.$product_id.'&amp;category_id='.$category_id.'&amp;option=com_virtuemart&amp;Itemid='.$Itemid;
  $db->query( "SELECT product_price_id FROM #__{vm}_product_price WHERE product_id='$product_id'");
  $db->next_record();
  $show_price_button = $db->f("product_price_id");
?>
<!-- Virtuemart Main -->
<div id="ssmed_vm_main">
	<!--Add Pathway-->
	<div id="ssmed_vm_pathway">
		<?php	if( $this->get_cfg( 'showPathway' )) {
					echo "<div class=\"pathway\">$navigation_pathway</div>";
				}
				if( $this->get_cfg( 'product_navigation', 1 )) {
					if( !empty( $previous_product )) {
						echo '<a class="go_prev" href="'.$previous_product_url.'">'.shopMakeHtmlSafe($previous_product['product_name']).'</a>';
					}
					if( !empty( $next_product )) {
						echo '<a class="go_next" href="'.$next_product_url.'">'.shopMakeHtmlSafe($next_product['product_name']).'</a>';
					}
				}
		?>
	</div>
<br class="ssmed_clr"/>
<!--Add Main-Div-->
<div id="ssmed_product_presentation">
	<div id="ssmed_productinfo_area">
		<div id="ssmed_optical_area">
			<?php require_once($ssmedvmimageshow); ?>
		</div>
		<?php if( !empty( $product_description )) : ?>
			<div class="ssmed_tablestyle_rb">
				<div class="ssmed_tablestyle_lb">
					<div class="ssmed_tablestyle_rt">
						<div class="ssmed_tablestyle_lt">
							<div id="ssmed_productdesc_area">
								<a name="product_desc"></a>
								<h3>
									<?php echo JText::_('PRODUCT_FULLDESC_TITLE'); ?>
								</h3>
								<p>
									<?php echo $product_description ?>
								</p>
							</div>
						</div>
					</div>
				</div>
			</div><div class="ssmed_clear"></div>
		<?php endif; ?>
		<?php if(!empty($product_type)) :?>
			<div class="ssmed_tablestyle_rb">
				<div class="ssmed_tablestyle_lb">
					<div class="ssmed_tablestyle_rt">
						<div class="ssmed_tablestyle_lt">
							<div id="ssmed_producttyp_area">
								<h3>
									<?php echo JText::_('PRODUCT_TYPE_TITLE'); ?>
								</h3>
								<?php echo $product_type ?>
							</div>
						</div>
					</div>
				</div>
			</div>
		<?php endif; ?>
	</div>
<div id="ssmed_info_area">
	<div class="ssmed_tablestyle_rb">
		<div class="ssmed_tablestyle_lb">
			<div class="ssmed_tablestyle_rt">
				<div class="ssmed_tablestyle_lt">
					<div id="ssmed_pre_infos">
						<div id="ssmed_productname"><?php echo $edit_link ?>
							<h1 class="ssmed_product_title">
								<?php echo $product_name ?>
							</h1>
						</div>
						<div id="ssmed_productshortdesc">
							<?php echo $product_s_desc ?>
							<?php if( !empty( $product_description )) : ?>
								<span id="product_desc_link">
									... <a href="<?php echo $url; ?>#product_desc"><?php echo JText::_('MORE'); ?></a>
								</span>
							<?php endif;?>
						</div>
						<?php if($show_price_button == "") : ?>
							<div id="ssmed_buybutton_area">
								<div id="ssmed_buybutton">
									<?php echo $product_price ?>
								</div>
							</div>
						<?php else:?>
							<div id="ssmed_buybutton_area">
								<div id="ssmed_buybutton">
									<div class="ssmed_buybutton_rb">
										<div class="ssmed_buybutton_lb">
											<div class="ssmed_buybutton_rt">
												<div class="ssmed_buybutton_lt">
													<div id="ssmed_price_box">
														<a href="<?php echo $url; ?>#buy">
															<h4 class="ssmed_pricelabel">
																<?php echo JText::_('BUY_IT_BUTTON'); ?>
															</h4>
															<div id="ssmed_product_price_box">
																<?php echo $product_price ?>
															</div>
														</a>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						<?php endif;?><br/><br/>
					<div class="ssmed_clr_info"/></div>
						<div id="ssmed_extended_infos">
							<?php require_once($ssmedadditionals);?>
								<div id="ssmed_ask_seller">
									<div id="ssmed_ask_seller_icon">
										<?php echo $any_question ?>
									</div>
									<div id="ssmed_ask_seller_text">
										<a rel="nofollow" href="<?php echo $ask_seller_href;?>">
											<span id="ask_sellertext_1">
												<?php echo JText::_('CONTACT_TITEL'); ?>
											</span>
											<span id="ask_sellertext_2">
												<?php echo JText::_('CONTACT_SLOGAN'); ?>
											</span>
										</a>
									</div>
								</div>
							<div class="ssmed_clear"></div>
						</div>
						<div id="ssmed_infolinks">
							<?php if( $this->get_cfg('showVendorLink')) { ?>
								<div id="ssmed_vendorlink">
									<?php echo $vendor_link; ?> 
								</div>
							<?php } ?>
							<?php if( $this->get_cfg('showManufacturerLink')) { ?>
								<div id="ssmed_manufacturerlink">
									<?php echo $manufacturer_link;?>
								</div>
							<?php } ?>
						</div>
					<div class="ssmed_clear"></div>
				</div>
			</div>
		</div>
	</div>
</div>
<?php if(!empty($product_reviews)) :?>
	<div class="ssmed_tablestyle_rb">
		<div class="ssmed_tablestyle_lb">
			<div class="ssmed_tablestyle_rt">
				<div class="ssmed_tablestyle_lt">
					<div id="ssmed_review_area">
						<div id="ssmed_product_reviews">
							<?php echo $product_reviews ?>
						</div>
						<div id="ssmed_review_input">
							<?php echo $product_reviewform ?>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div><div class="ssmed_clear"></div>
<?php endif; ?>
<?php if( !empty( $recent_products )) { ?>
	<div class="ssmed_tablestyle_rb">
		<div class="ssmed_tablestyle_lb">
			<div class="ssmed_tablestyle_rt">
					<div class="ssmed_tablestyle_lt">
							<div id="ssmed_recent_products">
								<div class="ssmed_recent_area">
									<?php echo $recent_products; ?>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		<?php }?>
	</div><div class="ssmed_clear"></div>
</div>

<!--Add Bottom-Div-->
	<div class="ssmed_tablestyle_rb">
		<div class="ssmed_tablestyle_lb">
			<div class="ssmed_tablestyle_rt">
				<div class="ssmed_tablestyle_lt">
					<div id="ssmed_buyarea">
					<a id="buy"></a>
					<div id="ssmed_product_additionals_left">
						<?php echo $addtocart ?> 
					</div>
					<div id="ssmed_product_additionals_middle">
						<?php if( $this->get_cfg( 'showAvailability' )) {
								echo $product_availability; 
								}
						?>
					</div>
					<div id="ssmed_product_additionals_right"> 
						<div id="ssmed_filelist_area">
							<?php if( !empty( $product_packaging )) : ?>
								<h4 class="product_packaging">
									<?php echo JText::_('PRODUCT_PACKAGING'); ?>
								</h4>
								<?php echo $product_packaging ?><br/><br/>
							<?php endif; ?>
							<?php if( !empty( $file_list )) : ?>
								<h4 class="product_filelist" >
									<?php echo JText::_('PRODUCT_FILELIST'); ?>
								</h4>
								<?php echo $file_list ?><br/>
							<?php endif; ?>
						</div>
						<div id="ssmed_buttons_heading">
							<?php echo $buttons_header ?>
						</div>
					</div>
					<div class="ssmed_clear"></div>
				</div>
			</div>
		</div>
	</div>
</div>
<?php if( !empty( $related_products )) : ?>
	<div class="ssmed_tablestyle_rb">
		<div class="ssmed_tablestyle_lb">
			<div class="ssmed_tablestyle_rt">
				<div class="ssmed_tablestyle_lt">
					<div id="ssmed_relatet_products_area">
						<?php echo $related_products ?><div class="ssmed_clear"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
<?php endif; ?>
<?php if( !empty( $navigation_childlist )) : ?>
	<div class="ssmed_tablestyle_rb">
		<div class="ssmed_tablestyle_lb">
			<div class="ssmed_tablestyle_rt">
				<div class="ssmed_tablestyle_lt">
					<div id="recent_products_area">
						<h3>
							<?php echo $VM_LANG->_('PHPSHOP_MORE_CATEGORIES') ?>
						</h3>
						<?php echo $navigation_childlist ?>
						<div class="ssmed_clear"></div>
					</div>
				</div>
			</div>
		</div>
	</div><div class="ssmed_clear"></div>
<?php endif; ?>
</div>
<!--END of ssmed_vm_main-->
<div style="color: #ccc;padding: 3px 0; margin: 0;font: 8px Verdana;text-align:center;">
Designed by <a style="color: #ccc;"href="http://www.joomla-virtuemart-designs.com">Virtuemart Themes</a>
</div>
<div class="ssmed_clear"></div>